package com.studyhub.mails.controller;

import com.studyhub.core.result.Result;
import com.studyhub.api.mails.model.Mails;
import com.studyhub.mails.service.MailsServiceImpl;
import com.studyhub.web.annotation.Inner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/mails")
public class MailsController {
    @Autowired
    MailsServiceImpl mailsService;
    @Inner
    @PostMapping("/send-mail")
    public Result sendMail(@RequestBody Mails mailVo) {
        return Result.success(mailsService.sendMail(mailVo));
    }
}
